package com.groupbuying.cheetah.mq;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * 订单消息MQ配置文件
 * @Author cuich
 * @Date 2019-05-15
 */
@Component
public class CheetahMQConfig {
    public static  String TOPIC ;
    public static  String GROUP_ID;
    public static final String ACCESS_KEY = "LTAIkLoCSLqX7QFG";
    public static final String SECRET_KEY = "anr8xwxEFrN4Rq0Gjw5MXxELuDb12V";
    public static final String NAMESRV_ADDR = "http://onsaddr.mq-internet-access.mq-internet.aliyuncs.com:80";

    //注入对应中心的topic
    @Value("${RocketMQ_Key.Cheetah.Topic}")
    private void setTOPIC(String TOPIC) {
        CheetahMQConfig.TOPIC = TOPIC;
    }

    //注入对应中心的groupId
    @Value("${RocketMQ_Key.Cheetah.GroupId}")
    private void setGroupId(String groupId) {
        CheetahMQConfig.GROUP_ID = groupId;
    }

    //订单支付查询
    public static final String ORDER_PAYMENT_INQUIRY_TAG = "ORDERPAYMENTINQUIRY";
    //流水信息查询
    public static final String ORDER_STORE_MONEY_FLOW_TAG = "ORDERSTOREMONEYFLOW";
    //订单支付查询退款数据
    public static final String ORDER_PAYMENT_REFUND_TAG = "ORDERPAYMENTREFUND";
    //tmp订单结算数据
    public static final String TMP_ORDER_SETTLE_TAG = "TMPORDERSETTLE";
    //tmp订单结算退款数据
    public static final String TMP_ORDER_SETTLE_REFUND_TAG = "TMPORDERSETTLEREFUND";
    //tmp订单支付数据
    public static final String TMP_ORDER_PAY_TAG = "TMPORDERPAY";
    //tmp订单支付退款数据
    public static final String TMP_ORDER_PAY_REFUND_TAG = "TMPORDERPAYEREFUND";
    //tmp订单流水数据
    public static final String TMP_ORDER_FLOW_TAG = "TMPORDERFLOW";
    //tmp订单流水退款数据
    public static final String TMP_ORDER_FLOW_REFUND_TAG = "TMPORDERFLOWEREFUND";
    //消费者订阅全部tag
    public static final String ALL_TAG = "*";

    /**
     * NAMESRV_ADDR, 请在mq控制台 https://ons.console.aliyun.com 通过"实例管理--获取接入点信息--TCP协议接入点"获取
     */


}
